﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Configuration;
using System.Web;

namespace Alogient.Cameleon.Community.Util
{
    internal class ConfigurationUtils
    {
        private ConfigurationUtils() { }

        private static string _connectionString = null;
        private static string _defaultCultureCode = null;

        public const string DEFAULT_CULTURE_CODE = "CM.DefaultCultureCode";

        public static string ConnectionString
        {
            get
            {
                if (_connectionString == null)
                {
                    _connectionString = ConfigurationManager.ConnectionStrings[Constants.CONNECTION_STRING_NAME].ConnectionString;
                }

                return _connectionString;
            }
        }
        public static string DefaultCultureCode
        {
            get
            {
                if (_defaultCultureCode == null)
                {
                    _defaultCultureCode = ConfigurationManager.AppSettings[DEFAULT_CULTURE_CODE];
                }

                return _defaultCultureCode;
            }
        }

    }
}
